home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(_name != "seeker")
- {
- if(_root.actions.dead)
- {
- _root.actions.explosion(this);
- removeMovieClip(this);
- }
- _rotation = _rotation + 10;
- deltaX = _X - _root.ship._x;
- deltaY = _Y - _root.ship._y;
- angle = - Math.atan2(deltaX,deltaY);
- ySpeed = speed * Math.cos(angle);
- xSpeed = speed * Math.sin(angle);
- _Y = _Y - ySpeed;
- _X = _X + xSpeed;
- _root.actions.collisions(this);
- }
- }
-